package com.cesare.service.Impl;

import com.cesare.mapper.UserMapper;
import com.cesare.pojo.User;
import com.cesare.service.UserService;
import com.cesare.utils.MD5Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Transactional
    @Override
    public User queryUser(String name, String password) {
        return userMapper.queryUser(name, MD5Utils.code(password));
    }
}
